home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
macros
/
texsis
/
VMS
/
TEXSIS05.COM
< prev
next >
Wrap
Text File
|
1992-08-02
|
87KB
|
1,977 lines
$! === THIS IS AN ARCHIVE FILE -- DELETE EVERYTHING ABOVE THIS LINE ===
$! === THEN EXECUTE THIS FILE WITH "@TEXSIS05.COM" ===
$! Contents:
$! Elsevier.txs
$! TXSeqns.doc
$! TXSfmts.tex
$! TXSintro.doc
$! TXSletr.doc
$! TXSmemo.tex
$! =========== Elsevier.txs ============
$ copy sys$input Elsevier.txs
% file: Elsevier.txs TeXsis version 2.14
% $Revision: 15.0 $ : $Date: 91/07/09 19:24:09 $ : $Author: myers $
%======================================================================*
% Elsevier -- TeXsis style file for North-Holland Physics Publishers
%
% \NorthHolland North Holland proceedings format,
% single column, left justified titles
% \NorthHollandTwo North Holland double column proceedings
% format, left justified titles
%======================================================================*
\ATunlock
\emsg{\@comment\ Elsevier: North-Holland/Elsevier style}%
%--------------------------------------------------*
% \NorthHolland -- North-Holland/Elsevier Proceedings Layout.
% Single column with left justified title, author, and abstract, small
% \parindent, intented subsections.
% Note that \author treats the first line as the author's name and
% the following lines as addresses. You can can extend the author line
% to more than one line by ending the lines with \
\def\NorthHolland{% North-Holland/Elsevier Proceedings
\auxswitchtrue % save tags and labels in .aux file
\refswitchtrue % save references in .ref file
\texsis % initialize
\def\Tbf{\twelvepoint\rm}% % Title typestyle
\def\tbf{\twelvepoint\rm}% % section head typestyle
\twelvepoint% % 12 pt type
\parindent=0.65cm% % small indent
\hsize=16.8cm% % width
\vsize=25.0cm% % height
\nopagenumbers% % don't print page numbers
\showsectIDtrue% % show section numbers
\parskip=0pt plus0pt minus0pt\relax% % no stretch!
\advance\voffset by-0.5in\relax% % fit page
\raggedbottom% % since no stretch
\let\@@@disclaimer=\disclaimer% % save it
\def\disclaimer{% % in 12 pt
\let\tenrm=\twelverm% %
\@@@disclaimer}% %
%
\def\titlepage{% % for \NorthHolland
\bgroup % begin title page
\let\endmode=\relax % define end
\pageno=1% % start on 1
\vbox{\vskip1.2cm}}% % whitespace at top
\def\endtitlepage{% % for \NorthHolland
\endmode % end titlepage
\egroup% % end group
\doublespaced}% % double space below
%
\def\title{% % for \NorthHolland
\endmode % end previous field
\bgroup\narrower% % margins
\let\endmode=\endtitle % set up ending
\mark{Title Page\NX\else Title Page}% mark page so no \HeadLine
\flushleft% % left justified with line breaks
\hyphenpenalty=10000% % no hyphens
\exhyphenpenalty=10000% % no hyphens
\singlespaced}% % single spaced
\def\endtitle{% % for \NorthHolland
\endflushleft% % end flush left and group
\vskip\normalbaselineskip% % skip a line
\egroup}% % end title group
%
\def\author{% % for \NorthHolland
\endmode % end previous field
\bgroup\narrower% % margins
\let\endmode=\endauthor % set up ending
\flushleft% % flush left
\@NHgetauthor}% % get author
\def\endauthor{% % for \NorthHolland
\vskip\normalbaselineskip% % skip line - another in \abstract
\endflushleft% % end flush left
\egroup}% % end author group
%
\def\abstract{% % for \NorthHolland
\endmode % end previous field
\vskip\normalbaselineskip % skip second line
\bgroup\narrower% % margins
\let\endmode=\endabstract % set up ending
\noindent}% % no indent
\def\endabstract{% % for \NorthHolland
\vskip0pt% % force vertical mode
\egroup}% % end abstract group
\let\section=\@NHsection% % for \NorthHolland
\let\subsection\@NHsubsection% % for \NorthHolland
}% % end \NorthHolland
% \@NHgetauthor is like \getauthor but left justifies and skips
% 1 line after author's name.
{\obeylines
\gdef\@NHgetauthor#1
#2
{#1\vskip0pt\noindent{#2}% % author line
\vskip1\normalbaselineskip}% % blank line
}
% \section for \NorthHolland
\def\@NHsection#1{% % N.Holland section
\everysection% % user customization
\vskip 2\normalbaselineskip\goodbreak% % make some space
\global\advance\sectionnum by \@ne % increment section counter
\global\subsectionnum=\z@% % reset subsection counter
\edef\ttt{\@chaptID\the\sectionnum}% % For use by \label
\s@ction% % checkenv, etc..
\vbox{% % heading in \vbox
\begingroup\raggedright % group for \tbf
\ifshowsectID % show section number?
\global\edef\@sectID{\the\sectionnum.}% yes: define section ID
\r@set% % and reset counters
\setbox0=\hbox{\noindent\@chaptID\@sectID\space}% find width
\hangindent=\wd0\hangafter=1% % hanging indent after 1st line
\noindent{\tbf{\@chaptID\@sectID\space}}% and print sect ID
\else\gdef\@sectID{}% % no: section ID is null
\noindent % just print section title
\fi % end \ifshowsectID
{\tbf{#1}}\relax % Print title ragged in \tbf
\endgroup % end \tbf
\nobreak\medskip}% % skip down some
\begingroup % group for \contents, etc.
\def\label##1{}\def\goodbreak{}% % disable \label & \goodbreak
\def\n{\ }\def\nl{\ }% % turn off \n
\def\mib{}% % turn off \mib
\emsg{Section \ttt.\space #1}% % announce in .LIS and
\ifnum\chapternum=0% % no chapter number, so
\global\edef\HeadText{{\tenit #1}}\fi % make running head the title
\addTOC{\ttt.}{\ #1}{1}% % add to table of contents
\def\sectiontitle{#1}% % for \aftersection
\endgroup% % end \contents group
\nobreak% % no break
\aftersection\nobreak}% % user can customize
% \subsection for \NorthHolland, with indented nonbold titles and
% fixes for standard version.
\def\@NHsubsection#1{% % N.Holland sub-section
\everysubsection% % user customization
\vskip\baselineskip\goodbreak% % break
\checkquote% % make sure no open quotes
\global\advance\subsectionnum by\@ne% % increment counter
\edef\ttt{\@chaptID\@sectID\the\subsectionnum.}% for \label
\vbox{% % heading in \vbox
\begingroup\raggedright% % Print title ragged, indent
\ifshowsectID% % showing section numbers?
\setbox0=\hbox{\noindent\ttt\space}% % find width
\hangindent=\wd0\hangafter=1\relax% % hanging indent after 1st line
\ttt\space% % show subsection number
\fi #1\relax% % print the title
\endgroup% % end \bf
\nobreak\medskip% % skip down some
\nobreak\vskip-\parskip}% % cancel first \parskip
\begingroup% % group for \contents, etc.
\def\label##1{}\def\goodbreak{}% % disable \label & \goodbreak
\def\n{\ }\def\nl{\ }% % turn off \n
\def\mib{}% % turn off \mib
\emsg{\ttt\space #1}% % announce in .LIS and
\addTOC{\ttt}{\ #1}{2}% % add to table of contents
\def\subsectiontitle{#1}% % for \aftersection to use
\endgroup% % end \contents group
\nobreak% % no page break
\aftersubsection}% % room to customize
%--------------------------------------------------*
% \NorthHollandTwo - North-Holland/Elsevier proceedings layout in
% double column format with titles left justified, eleven point type, etc.,
% for camera-ready copy. Constructed following directions in ``Instructions
% for the Preparation and Typing of Camera Ready Contributions'' by Mary
% Carpenter, Elsevier Publishers.
\def\NorthHollandTwo{% North-Holland/Elsevier proceedings 2-column layout
\auxswitchtrue % save tags and labels in .aux file
\refswitchtrue % save references in .ref file
\texsis % initialize
\def\Tbf{\elevenpoint\bf}% % Title typestyle
\def\tbf{\elevenpoint\it}% % section head typestyle
\setdoublecolumns{21.3cm}{27.1cm}{10.0cm}%
\parindent=0.6cm %
\advance\voffset by -2.2cm \relax % as close to the top as possible
\advance\hoffset by -2.3cm \relax % as close to the left as possible
%
\emsg{ }
\emsg{The \NX\NorthHollandTwo document layout you have selected is}%
\emsg{too large to fit on one 8.5 x 11.0 page. You should either}%
\emsg{print the output on an oversized printer or offset the output}%
\emsg{horizontally to get one column at a time. }%
\emsg{Please enter the horizontal OFFSET TO THE LEFT (with units!):}%
\read-1 to \tmp % read from terminal (use UNITS!)
\if\tmp\par \relax\else % if blank line, ignore
\advance \hoffset by -\tmp\relax % else move \hoffset left
\fi
%
\def\titlepage{% % for \NorthHollandTwo
\pageno=1 %
\hbox{\ }% % anchor to top of page
\bgroup %
\let\endmode=\relax % \endmode will end a field
\vskip 0.3cm % whitespace on title page
\narrower\parindent=0pt}% %
\def\endtitlepage{% % for \NorthHollandTwo
\endmode % end any open field
\smallskip %
\egroup}% %
%
\def\title{% % for \NorthHollandTwo
\endmode % end previous field, if any
\mark{Title Page\NX\else Title Page}% % so \HeadLine doesn't print
\bgroup % begin title group
\flushleft % left justified
\let\endmode=\endtitle %
\Tbf\widenspacing}% % \Tbf is Title boldface
\def\endtitle{% % for \NorthHollandTwo
\endflushleft %
\egroup% % end title group
\bigskip}% %
%
\let\getauthor=\LATauthor % see definition below
\def\endauthor{\par\egroup\medskip}% %
\def\and{\smallskip{and}\smallskip}% %
%
\def\abstract{% % for \NorthHollandTwo
\endmode % end any open field
\bigskip %
\bgroup %
\let\endmode=\endabstract %
\singlespaced\noindent}% %
\def\endabstract{% % for \NorthHollandTwo
\medskip\egroup\bigskip}% %
%
\elevenpoint % eleven point type size
\parindent=0.6cm % paragraph indent
\autoparens % auto-sizing of parens
\quoteon % automatic begin/end quotes
\nopagenumbers % don't print page numbers
\singlespaced\whitespaced % 1.25 percent spacing
} % end of \NorthHollandTwo
% \NorthHollandTwo replacement for \getauthor left justifies
{\obeylines
\gdef\LATauthor#1
#2
{#1\bigskip\noindent{\bf #2}\medskip}%
}
\ATlock
%>>> EOF Elsevier.txs <<<
$! =========== TXSeqns.doc ============
$ copy sys$input TXSeqns.doc
% file: TXSeqns.doc TeXsis version 2.15
% $Revision: 15.5 $ : $Date: 92/06/12 21:48:28 $ : $Author: paige $
%======================================================================*
% TeXsis Manual - EQUATIONS : This file is a part of TeXsis
% (C) Copyright 1989, 1992 by Eric Myers and Frank E. Paige
%======================================================================*
\ifx\undefined\bs \texsis\input TXSdocM.doc\draft\fi
\section{Equations \label{sect.eqns}}
Plain \TeX\ was designed to make it easy to typeset equations
and mathematical formulae. \TeXsis\ provides additional features
that make the job even easier. Among these are the automatic
numbering of equations, automatic sizing of parentheses, and a
collection of special symbols that are used by physicists.
\subsection{Equation Numbering \label{sect.eqno}}
In Plain \TeX\ equation numbers are added to displayed
equations with the \cs{eqno} command, as described in Chapter~19 of
\TeXbook. For example, typing
\index{equations!numbering}
\TeXexample
$$ E=mc^2. \eqno (47) $$
|endTeXexample
will produce:
\offparens
$$
E = mc^2 \eqno (47)
$$
in the output. With \TeXsis\ the procedure for getting
automatically numbered equations is similar, except that you use
\CS{EQN} instead of \cs{eqno}, and what follows this (up to the
``|$$|'') is not used as the number of the equation, but as an
internal {\it label}\, for the equation. For example, if you had
already used |\EQN| to create three numbered equations, then
typing
\eqnum=3
\TeXexample
$$ \vec F = -{G_N Mm \over r^2} \hat r
\EQN Newton $$
|endTeXexample
would produce
$$
\vec F = -{G_N Mm \over r^2} \hat r
\EQN Newton
$$
\TeXsis\ automatically assigns the next available equation number to
the equation and prints this number on the right, in parentheses.
The equations that follow the one above would be numbered 4.5,
4.6, and so on.
The purpose of the "label" after the |\EQN| is to let you
refer to the equation in the text without knowing the equation
number that has been assigned to it. For example, to refer to
\Eq{Newton} above, which has the label ``Newton'', you might type
\index{equations!labeling}
\TeXexample
The dependence of the force on the inverse square of the distance
can be seen in \Eq{Newton}.
|endTeXexample
This would be printed as:
\example
The dependence of the force on the inverse square of the distance
can be seen in \Eq{Newton}.
\endexample
The control sequence \CS{Eq}\arg{label} gives the same result
as typing "|Eq.~(|$nn$|)|", where $nn$ is the appropriate
equation number for the given label. Two other similar control
words allow you to refer to a range of equations, or to refer to
an equation simply by number, without the preceding "|Eq.~|."
Typing \CS{Eqs}\arg{label} produces "Eqs.~($nn$)", while
\CS{Ep}\arg{label} gives just the equation number associated
with the label, enclosed in parentheses. Thus typing
\TeXexample
The class of metrics defined by \Eqs{cond-1} through
\Ep{cond-5} can all be shown to satisfy inequality
\Ep{triangle}, as well as the condition in \Eq{Killing}.
|endTeXexample
would produce in the output something like:
\example
The class of metrics defined by Eqs.~(14) through
(19) can all be shown to satisfy inequality
(23), as well as the condition in Eq.~(7).
\endexample
Almost any sequence of characters can be used as a "label" for
an equation. This includes letters, numbers, and punctuation
marks, but it is best to avoid \TeX's special characters, such as
|\|, |&|, |}|, |{|, |$|, |_|, and |^|. Spaces may be included
but will be ignored, and there {\it is} a difference between
uppercase and lowercase letters. Also, the semicolon (|;|) is
reserved for a special purpose, as described below.
You may want to give equations "names," as in the example
called "Newton" above, or you can give the equations labels that
are numbers. This is the best thing to do if the equations in
the original manuscript already have numbers, but if you do this
then you should be sure to remember that the internal label and
the number which is printed (the ``external'' number) are not
necessarily the same. If the equation {\it labeled} ``15'' is
the fifteenth equation in the document then it will also be
equation number 15, but if you move the equation around in the
file so that it is the sixth equation in the document it will be
printed as equation 6, even though it has the label ``15''.
If you have a heavily edited document and the arrangement of
the numbers and labels gets confusing there is a useful aid to
help straighten things out. If you say
\example
\CS{eqnotracetrue}
\endexample
then the equation numbers will be printed as usual, but with the label
appearing next to it in the right margin in square brackets.
For example, the equation
\TeXexample
$$
(i\gamma^\mu \partial_\mu - m)\psi (x) = 0
\EQN Dirac $$
|endTeXexample
when printed with |\eqnotracetrue| would appear as
\begingroup\eqnotracetrue
$$
(i\gamma^\mu \partial_\mu - m)\psi (x) = 0
\EQN Dirac$$
\endgroup
Since the label appears in the margin the spacing of your document
remains exactly the same.
Obviously you would not print the final copy of the document this way,
but it can be very useful for editing. You can turn off this
equation tracing feature anytime by saying \cs{eqnotracefalse}. If you
say \cs{draft} at the beginning of your document then the equation
tracing will be turned on automatically (along with some other useful
features).
\index{equations!labeling}
\bigskip
Sometimes when several equations are closely related you will
want to give the whole set the same equation number. To distinguish
separate formulae in such a group you then generally add a letter to
the number. You might, for example, have the equation
\index{equations!multiple}
$$
J^2\ket{j,m} = j(j+1) \ket{j,m} \EQN eigen;a
$$
and then a short while later you might have the related equation
$$
J_z\ket{j,m} = m \ket{j,m} \EQN eigen;b
$$
These may be referred to together as \Eqs{eigen} or may be
referred to separately as \Eqs{eigen;a} and \Ep{eigen;b}. To get
an equation number with a letter in it you still use \CS{EQN}, but
you add the appropriate letter to the end of the label, separated
{from} the label by a semicolon. The equations above were created
by typing:
\TeXexample
$$
J^2\ket{j,m} = j(j+1) \ket{j,m} \EQN eigen;a
$$
|endTeXexample
and
\TeXexample
$$
J_z\ket{j,m} = m \ket{j,m} \EQN eigen;b
$$
|endTeXexample
The semicolon is not printed --- it is just used to separate the
letter from the label. If the letter is ``a'' then the next
available equation number is used, as usual, but if the letter is
anything else then the equation number is not incremented and
instead the number from the previous equation is used. You can
use any sequence of letters you like, although it is usually best
to use ``a,b,c$\ldots$'' for consecutive equations.
To refer to equations that have both numbers and letters you
can either use the letter to pick out a specific equation, or
simply leave out the letter and use the label to refer to the
whole lot all at once. You can use either \CS{Eq} or \CS{Eqs} to do
this. For example, the sentence after \Eq{eigen;b} above was
created by typing
\TeXexample
These may be referred to together as \Eqs{eigen}
or may be referred to separately as
\Eqs{eigen;a} and \Ep{eigen;b}.
|endTeXexample
\index{equations!multiple}
\bigskip
You will eventually encounter an equation that is so long that
it has to be broken up into several lines. Or you will want to
print several equations together, lined up by their "$=$" signs.
In Plain \TeX\ you would use |\eqalign| to display these kinds of
equations, or |\eqalignno| to display them with equation numbers.
To get automatically assigned equation numbers in aligned
equations with \TeXsis\ you should use \CS{EQNalign} in place of
\cs{eqalign} or \cs{eqalignno}. As usual the alignment of the
equations is controlled by |&| and |\cr|. An equation number is
assigned to a particular line by putting |\EQN| followed by a
label on that line, before the |\cr|. The label is everything
{from} the |\EQN| up to the |\cr|. For example,
\index{equations!alignment}
\TeXexample
$$
\EQNalign{
{dp \over dt} &= - {\partial H \over \partial q}
\EQN Hamilton-1 \cr
{dq \over dt} &= {\partial H \over \partial p}
\EQN Hamilton-2 \cr}
$$
|endTeXexample
produces the two aligned and numbered equations
$$
\EQNalign{
{dp \over dt} &= - {\partial H \over \partial q} \EQN Hamilton-1 \cr
{dq \over dt} &= {\partial H \over \partial p} \EQN Hamilton-2 \cr}
$$
\cs{EQNalign} can be used both for typing multi-part equations or for
splitting an equation which is too long to fit on a single line.
However, when splitting a single long equation into several lines it may
actually be better to use |$$\eqalign{|\meta{formula}|}| followed by
|\EQN| \meta{label}|$$|. For example, in
$$
\eqalign{
{\cal L}_{NC} &= {-g \over 2\cos\theta_W} \sum_i
\bar\psi_i [ (t_{3,i}-2Q_i\sin^2\theta_W) \gamma_\mu
- t_{3,i}\gamma_\mu\gamma_5 ]\psi_i Z^\mu \cr
&\quad - e \sum_i Q_i \bar\psi_i \gamma_\mu \psi_i A^\mu \cr}
\EQN{NC}
$$
the equation number is centered between the two lines of the equation.
This equation was produced using \cs{eqalign} by typing:
\TeXexample
$$
\eqalign{
{\cal L}_{NC} &= {-g \over 2\cos\theta_W} \sum_i
\bar\psi_i [ (t_{3,i}-2Q_i\sin^2\theta_W) \gamma_\mu
- t_{3,i}\gamma_\mu\gamma_5 ]\psi_i Z^\mu \cr
&\quad - e \sum_i Q_i \bar\psi_i \gamma_\mu \psi_i A^\mu \cr}
\EQN{NC}
$$
|endTeXexample
Closely related equations can be displayed together with the
same equation number by following the label with a semicolon and
a letter, as already described above. For example, the set of
equations,
$$
\EQNalign{
\nabla \cdot \vec D &= 4 \pi \rho \EQN EM;a \cr
\nabla \times \vec E &=
- {1 \over c} {\partial \vec B \over \partial t}
\EQN EM;b \cr
\nabla \cdot \vec B &= 0 \EQN EM;c \cr
\nabla \times \vec H &= {4 \pi \over c} \vec J
+ {1 \over c} {\partial \vec D \over \partial t}
\EQN EM;d \cr}
$$
is produced by typing:
\TeXexample
$$
\EQNalign{
\nabla \cdot \vec D &= 4 \pi \rho \EQN EM;a \cr
\nabla \times \vec E &=
- {1 \over c} {\partial \vec B \over \partial t}
\EQN EM;b \cr
\nabla \cdot \vec B &= 0 \EQN EM;c \cr
\nabla \times \vec H &= {4 \pi \over c} \vec J
+ {1 \over c} {\partial \vec D \over \partial t}
\EQN EM;d \cr}
$$
|endTeXexample
Note that the alignment of the equations is controlled by |&| and
|\cr|, not by the arrangement used when the equation was typed
into the manuscript file. Still, it is recommended that you
arrange long sets of equations like these in some sort of clear
pattern when you type them. This will both reduce errors when
the equation is typed and make it easier for you to read the file
when you are looking at it later. Remember, \TeX\ ignores all
spaces and tabs when it reads material for equations or displayed
equations.
\index{equations!alignment}
\CS{EQNdoublealign} is similar to \cs{EQNalign} but makes
equations with two alignment tabs. For example,
\TeXexample
$$
\EQNdoublealign{
\sigma_i^2 &= 1 & \EQN Pauli;a \cr
\sigma_i\sigma_j + \sigma_j\sigma_i &= 0 \qquad & (i \ne j)
\EQN Pauli;b \cr
\sigma_i\sigma_j &= i\sigma_k \qquad & (i,j,k\ {\rm cyclic})
\EQN Pauli;c \cr}
$$
|endTeXexample
produces
$$
\EQNdoublealign{
\sigma_i^2 &= 1 & \EQN Pauli;a \cr
\sigma_i\sigma_j + \sigma_j\sigma_i &= 0 \qquad & (i \ne j)
\EQN Pauli;b \cr
\sigma_i\sigma_j &= i\sigma_k \qquad & (i,j,k\ {\rm cyclic})
\EQN Pauli;c \cr}
$$
with both the equal signs and the parentheses aligned. The second
|&| is required in the first line, because without it the |\EQN| would
have aligned the equation number with the parentheses.
Plain \TeX\ also lets you display formulae on several lines
without any alignment by using \cs{displaylines}. With \TeXsis\ you
can use the similar control sequence \CS{EQNdisplaylines} to get an
automatically assigned equation number for any line in such a
display. The pattern is the same as in |\displaylines|, but you
simply insert \cs{EQN}\meta{label} in front of the \cs{cr} on the
line you want numbered. \CS{EQNdisplaylines} produces less space
between the equations than would result from typing them
separately, and generally looks better.
All of the equation alignment macros are special cases of the plain
\TeX\ macro \cs{halign}. Therefore, if necessary, the vertical spacing can
be adjusted by inserting
\example
\cs{noalign}\cs{vskip}\meta{dimen}
\endexample
where \meta{dimen} can be either a positive or a negative dimension.
\bigskip
In a long document there are several different ways to number
the equations. You could just start at ``1'' and count up for
each new equation. Sometimes though, it is better to number the
equations consecutively within each chapter or section of a
document. In \TeXsis\ the default form for an equation number is
$cc.ss.nn$ where $cc$ stands for the chapter number, $ss$ is the
section number, and $nn$ is the equation number within that
section. Whenever you move to a new section or chapter (using
\cs{section} or \cs{chapter}, as described in
Section~\use{sect.sects}) the number $ss$ or $cc$ is incremented
by one and the number $nn$ is reset to one. If you are not using
chapter divisions in your document then the chapter number $cc$
is not made a part of the equation number, and the number $nn$ is
reset only at the beginning of a section. If you are not using
section divisions in your document then the section number $ss$
is not made a part of the equation number, and the number $nn$ is
reset to one only at the beginning of a chapter. If you use
neither chapter nor section divisions in your document then
neither the chapter number $cc$ nor the section number $ss$ will
be made a part of the equation number, and the equations will
simply be numbered consecutively, 1, 2, 3\dots.
\index{equations!numbering}
Although the system just described for forming equation
numbers gives a result that is usually what you will want for
your equation numbering you can change the method by setting
either of two switches. If you say |\showchaptIDfalse| then the
chapter number $cc$ will not be made a part of the equation
number even though you may be using chapter level divisions in
your document. Similarly, saying |\showsectIDfalse| prevents the
section number $ss$ from being used in the equation number. The
opposites of these two switches are \cs{showchaptIDtrue} and
\cs{showsectIDtrue}. The equation number $nn$ is reset to one only
when a section or chapter number that is supposed to be visible
is incremented, as you might expect.
%>>> EOF TXSeqns.doc <<<
$! =========== TXSfmts.tex ============
$ copy sys$input TXSfmts.tex
%% file: TXSfmts.tex TeXsis version 2.15
% $Revision: 15.6 $ : $Date: 92/06/30 11:10:05 $ : $Author: myers $
%======================================================================*
% DOCUMENT FORMATS (C) copyright 1986, 1991 by Eric Myers.
%
% Several standard document formats are defined in TeXsis. All of
% these set up the appropriate dimensions, title page macros, etc., and
% call \texsis:
%
% \preprint Preprint format. Makes a standard title
% page from \title, \author, etc. and puts the
% manuscript on the following pages.
%
% \Manuscript Like \preprint, but printed with
% \TrueDoubleSpacing for submission to
% journals like Physical Review
%
% \paper Like \preprint but puts \title, \author,
% etc. material at top of first page
% instead of on a separate title page.
%
% \book For books, with chapters and sections,
% and odd/even page numbering
%
% \slides Slides/transparencies format, in 24 pt type,
% special formatting.
%
% \letter Standard business letter; see TXSletr.tex
%
% \memo Standard memo; see TXSmemo.tex.
%
% \referee Referee reports; similar to \memo
%
% \twinprint Preprint in twin page format, with
% title page in full size landscape.
%
% \twinformat Twin page formatting for other styles.
%
% More specialized document layouts are available in ``style''
% files, which are only loaded when they are called for. This is
% accomplished with the \autoload macro described below. It's possible
% (and easy) to add new style files for any desired document layout.
%
% The specialized document layouts which are currently loaded
% from style files [named in brackets] are:
%
% \nuclproc The ``NUCLPROC'' style for Nuclear
% Physics Proceedings. [nuclproc.txs]
%
% \NorthHolland North Holland proceedings format,
% single column, left justified titles.
% [Elsevier.txs]
%
% \NorthHollandTwo North Holland double column proceedings
% format, left justified titles. [Elsevier.txs]
%
% \WorldScientific World Scientific proceedings format.
% [WorldSci.txs]
%
% \IEEEproceedings Conference paper in double column IEEE
% format. [IEEE.txs]
%
% \IEEEreduced Same as \IEEEproceedings but reduced
% by 75% to fit on 8.5 x 11 paper. [IEEE.txs]
%
% \AIPproceedings Conference paper in the American Institute
% of Physics (AIP) format. [AIP.txs]
%
%======================================================================*
\message{Layout macros.}
\catcode`@=11
%--------------------------------------------------*
% Paper Layout: This prints the \titlepage material at the top of
% the first page, not on a separate page.
\def\paper{% % Paper:
\auxswitchtrue % save tags and labels in .aux file
\refswitchtrue % save references in .ref file
\texsis % Initialize
\def\titlepage{% % \paper title page
\bgroup % so changes don't leak out
\let\endmode=\relax % \endmode will end a field
\pageno=1}% % title page is page 1 by default
\def\endtitlepage{% % \paper end title page
\endmode % end any open field
\goodbreak\bigskip % no new page, but maybe break here
\egroup}% % everything back the way it was
\def\Tbf{\fourteenpoint\bf}% % 14pt bold title
\def\tbf{\twelvepoint\bf}% % 12pt bold section head
\autoparens % auto-sizing of parens
\quoteon % automatic begin/end quotes
}
%--------------------------------------------------*
% Preprint Layout: This prints the \titlepage material on a separate
% page with a \banner at the top.
\def\preprint{% Document layout for Preprints
\auxswitchtrue % save tags and labels in .aux file
\refswitchtrue % save references in .ref file
\texsis % Initialize TeXsis
\def\titlepage{% % \preprint title page
\bgroup % so changes don't leak out
\pageno=1 % title page is page 1 by default
\let\endmode=\relax % \endmode will end a field
\banner}% % prints the banner at top of page 1
\def\endtitlepage{% % \preprint end title page
\endmode % end any open field
\vfil\eject % new page
\egroup}% % everything back the way it was
\def\Tbf{\fourteenpoint\bf}% % 14pt bold titles
\def\tbf{\twelvepoint\bf}% % 12pt bold section heads
\autoparens % auto-sizing of parens
\quoteon % automatic begin/end quotes
}
%--------------------------------------------------*
% \Manuscript is a layout similar to \preprint, but printed
% in \TrueDoubleSpacing. Use this for a manuscript to be submitted
% to a journal such as Physical Review.
\def\Manuscript{% layout for manuscripts to be submitted to journals
\preprint
\FiguresLast
\TrueDoubleSpacing}
%--------------------------------------------------*
% \book format is similar to \thesis but without the special
% formatting. Use for books, long review articles, etc.
\def\book{% document layout for a book or similar document
\ContentsSwitchtrue % contents page ON
\refswitchtrue % save references
\auxswitchtrue % .AUX file for forward references
\texsis % initialize TeXsis
\RunningHeadstrue % running headlines
\bookpagenumbers % page numbers for book binding
\def\titlepage{% % \book title page
\bgroup % any changes local
\pageno=-1 % start on page i
\let\endmode=\relax % \endmode will end a field
\def\FootText{\relax}}% % no number on title page
\def\endtitlepage{% % end title page for \book
\endmode % end any open field
\vfil\eject % end title page
\egroup% % close group from \titlepage
\pageno=1}% %
\def\abstract{% % abstract for \book
\endmode % end previous field
\bigskip\bigskip\medskip % skip down some
\bgroup\singlespaced % abstract has same spacing
\let\endmode=\endabstract % to end \abstract
\narrower\narrower}% %
\def\endabstract{% % end abstract for \book
\medskip\egroup\bigskip}% %
\def\FootText{--\ \tenrm\folio\ --}% % for 1st page of chapter
\def\Tbf{\sixteenpoint\bf}% % Chapter Titles in 16pt bold
\def\tbf{\fourteenpoint\bf}% % Section titles in 12pt bold
\twelvepoint % 12pt type for most of doc
\doublespaced % double spacing
\autoparens % auto-sizing of parens
\quoteon % auto quote matching
} %
%--------------------------------------------------*
% \thesis is loaded from a style file now because it will be
% different at different installations.
\autoload\thesis{thesis.txs}
%--------------------------------------------------*
% \letter is a letter format for typing letters, following the syntax
% in Appendix F of the TeXbook. See TXSletr.tex for details.
\def\Letter{% document format for letters
\ContentsSwitchfalse % no table of contents
\refswitchfalse % no reference list
\auxswitchfalse % no forward references
\texsis % initialize
\singlespaced % single space default
\LetterFormat} % Setup using \LetterFormat
\def\letter{\Letter} % synonym
%--------------------------------------------------*
% \memo Format for memoranda, as defined in TXSmemo.tex
\def\Memo{% document format for memos
\ContentsSwitchfalse % no table of contents
\refswitchfalse % no reference list
\auxswitchfalse % no forward references
\texsis % initialize
\singlespaced % single space default
\MemoFormat} % Setup using \MemoFormat
\def\memo{\Memo} % synonym
%--------------------------------------------------*
% \Referee format for Referee Reports, as defined in TXSmemo.tex
\def\Referee{% document format for referee reports
\ContentsSwitchfalse % no table of contents
\auxswitchfalse % no need for an .aux file
\refswitchfalse % no reference list
\texsis % initialize
\RefReptFormat} % Setup using \MemoFormat
\def\referee{\Referee} % synonym
%--------------------------------------------------*
% Landscape Layout: for printing ``sideways'' on the laser printer
%
% \Landscape sets up the page size for sideways (``landscape mode'')
% printing, and calls \LandscapeSpecial to signal this to the printer.
% What signal is given to the printer driver (with \special) depends
% on which filter or driver you are using. You may have to change
% the definition of \LandscapeSpecial to suit your installation.
\def\Landscape{% set page size for printing ``sideways''
\texsis % 12pt, double spaced, etc
\hsize=9in % wide in the side
\vsize=6.5in % short and stocky
\voffset=.5in % and a little space from the ``margin''
\nopagenumbers % default is no page numbering
\LandscapeSpecial % actually turns on landscape mode
}
\def\landscape{\Landscape} % synonym
%% \LandscapeSpecial turns on landscape mode on the laser printer.
%% How this is done is very site dependent, so you may need to
%% re-define this in TXSsite.tex
%%
%% 1) This is how dv2ips does it, and you need to have landscape.ps
%% accesable to the filter program
\def\LandscapeSpecial{\special{psfile=landscape.ps}}
%% % 2) This is how dvips (Rokicki's version 5.484) does it:
%%
%% \def\LandscapeSpecial{\special{papersize=11in,8.5in}}
%%
%--------------------------------------------------*
% \slides makes slides or transparencies in default 24pt type with
% sensible defaults. It also defines \bl for a blank line and
% \np for new page.
%
\def\slides{% % standard stuff except 12pt:
\quoteon % automatic quote balancing on
\autoparens % automatic paren balancing on
\ATlock % now @ is no longer a letter
\pageno=1 % start on page one
\twentyfourpoint % 24 point type
\doublespaced % double spaced
\raggedright\tolerance=2000 % very ragged right
\hyphenpenalty=500 % hyphens are bad
\raggedbottom % ragged bottom
\nopagenumbers % no numbers
\hoffset=-.25in \hsize=7.0in % to fit 8.5in x 10.5in
\voffset=-.25in \vsize=9.0in % to fit 8.5in x 10.5in
\parindent=30pt % for big type
\def\bl{\vskip\normalbaselineskip}% % blank line
\def\np{\vfill\eject}% % new page
\def\nospace{\nulldelimiterspace=0pt% % autoscale...
\mathsurround=0pt}% %
\def\big##1{{\hbox{$\left##1% % ...\big
\vbox to2ex{}\right.\nospace$}}}% %
\def\Big##1{{\hbox{$\left##1% % ...\Big
\vbox to2.5ex{}\right.\nospace$}}}% %
\def\bigg##1{{\hbox{$\left##1% % ...\bigg
\vbox to3ex{}\right.\nospace$}}}% %
\def\Bigg##1{{\hbox{$\left##1% % ...\Bigg
\vbox to4ex{}\right.\nospace$}}}%
}
%-----------------------------------------------------------------------
% \twinprint sets up a twin column preprint, with the first page
% full with in \twelvepoint and the rest in \tenpoint \twinout format.
\let\pr@pr@nt=\preprint % save \preprint
\def\twinprint{% % \twinout preprint
\hsize=\normvsize\vsize=\normhsize % set sizes
\pr@pr@nt % usual \preprint
\let\t@tl@=\title % save it
\def\title{\vskip-1.5in\t@tl@}% % reduce space
\let\endt@tlep@ge=\endtitlepage % save it
\def\endtitlepage{\endt@tlep@ge % usual \endtitlepage
\twinformat}% % twin column default
}
% \twinformat sets up the standard defaults for \twinout, with
% 10pt fonts and no headline offset.
\def\twinformat{% % 2 pages/page format
\tenpoint\doublespaced % ten point size
\def\Tbf{\twelvebf}\def\tbf{\tenbf}% % title fonts
\headlineoffset=0pt % no extra offset
\twinout % \twinout format
}
% >>> EOF TXSfmts.tex <<<
$! =========== TXSintro.doc ============
$ copy sys$input TXSintro.doc
%% file: TXSintro.doc TeXsis version 2.15
% $Revision: 15.11 $ : $Date: 92/07/31 16:37:22 $ : $Author: myers $
%=======================================================================*
% TeXsis Manual - INTRODUCTION : This file is a part of TeXsis
% (C) Copyright 1989, 1992 by Eric Myers and Frank E. Paige
%======================================================================*
\ifx\undefined\bs \texsis\input TXSdocM.doc\draft\fi
\section{Overview \label{sect.intro}}
\TeX\ is a computer typesetting language developed by Donald Knuth
\index{Knuth, Donald} and described in \TeXbook.\cite{Knuth} Its
greatest strength is its ability to typeset technical material and
mathematical equations using a syntax that is based on content;
\TeX\ automatically handles the actual placement of the characters
on the page. It also has a powerful macro capability, giving it
great flexibility. This has been exploited by many authors to
write "formats," or macro packages, providing features not
contained in the basic language, which is sometimes referred to
as ``Plain'' \TeX.\index{plain TeX@{plain \TeX}}
\TeXsis\ is a \TeX\ macro package which is designed primarily
for typesetting physics papers and preprints, conference
proceedings, and related documents. It has been developed from
the \idx{TechRpt} format described by W.~Groppe\ref{Groppe} and from
\TeXsis\ 1.01, the \TeX\ thesis format by E.~Myers.\cite{Myers}
\index{texsis@{\TeXsis}}
The general scope of \TeXsis\ is similar to the SLAC format
\idx{PHYZZX},\ref{PHYZZX} but it offers some significant advantages,
such as a more powerful and flexible way of referring to
references, equations, and other numbered objects. It is
functionally a superset of Plain \TeX, so that everything
described in \TeXbook\ will work in \TeXsis, although a few of
the Plain \TeX\ macros have actually been modified.
We should mention at the outset that \LaTeX, \index{latex@{\LaTeX}}
another popular \TeX-based macro package, is not compatible with Plain
\TeX, and as a consequence it is not possible to use \TeXsis\ with
\LaTeX\ or vice versa.
This document explains how to use \TeXsis. Since it is a user's
guide, it makes no attempt to describe how the various macros work; for
this information one should consult the source code, which is
extensively commented. However, we do assume that the reader is already
familiar with \idx{Plain} \TeX. New users should therefore first see
either \TeXbook, especially chapters~1-10 and 16-19, or \booktitle{A
Gentle Introduction to \TeX} by Michael~Doob,\cite{Doob} or the manual
by Spivak\ref{Spivak} which accompanies PC\TeX\ (which is an
implementation of \TeX\ for the IBM~PC). The sections of the present
document cover the following topics:\tag{pg.itemize}{\folio}
\itemize \clump
\itm \SEC{start} --
Getting Started. How to run and initialize \TeXsis, and the
"master file" concept.
\itm \SEC{fonts} --
Selecting sizes and fonts of type, choosing single, double, or
triple spacing, and automatically handling quotation marks.
\itm \SEC{eqns} --
Automatic numbering of equations, automatic sizing of parentheses
and brackets, and special symbols for physics equations.
\itm \SEC{refs} --
Defining new references, for which numbers are assigned automatically,
citing references already so defined, and making a list of references.
\itm \SEC{sects} --
Dividing a document into chapters, sections, subsections, and
appendices, and producing a table of contents.
\itm \SEC{fmts} --
Using pre-defined layouts for documents such as preprints,
conference proceedings and theses. Creating a title page.
\itm \SEC{envmt} --
Displaying text in special ways using "environments," including those
for centered lines, lists of things, listings of computer programs, and
\TeX\ examples.
\itm \SEC{figures} --
Producing automatically numbered tables and figures and producing
ruled tables.
\itm \SEC{letr} --
Typing letters, form letters, memos and referee reports.
\itm \SEC{dcol} --
Producing double column output.
\itm \SEC{labels} --
Labeling things like section numbers, figures, items in an
outline, or page numbers, and referring to them in other parts of the
document.
\itm \SEC{misc} --
Miscellaneous macros for ignoring text and doing various other useful
things, and a checkpoint/restart feature for printing very long documents.
\enditemize
Appendix~A explains how to install \TeXsis\ on a VAX/VMS system, on an
IBM~PC, and on the Berkeley Unix operating system. It also explains how
to customize \TeXsis\ for your own installation. Appendix~B lists the
fonts usually available with \TeXsis. Appendix~C lists changes that have
been made to \TeXsis\ in recent revisions.
Two examples of \TeXsis\ documents are included in the standard
distribution. The first is a short (3 pages) example of a physics paper
typeset with \TeXsis, which is contained in the file |Example.tex|. The
second is the manual itself, which was also created with \TeXsis. If
you would like to look at the files used to create the Manual the master
file is called |TXSdoc.doc|, and the various sections of the document
are in files with names of the form |TXS|$xxxx$|.doc|. For those who
are comfortable programming in \TeX\ it is possible to extract specific
macros from the \TeXsis\ source code or to modify or even rewrite these
macros. The source code is contained in files with names of the form
|TXS|$xxxx$|.tex|. We have tried wherever possible to include
illuminating comments in the source code.
%==================================================*
\subsection{Some Philosophy \label{sect.philosophy}}
In designing the \TeXsis\ macros we have tried to follow some basic
guidelines which we feel make \TeXsis\ a more useful tool. It may help
you while learning \TeXsis\ to know what these guidelines are:
\index{philosophy}
\item{1)}
Most importantly, \TeXsis\ will always be a superset of Plain \TeX, so
that anything you can't do in \TeXsis\ (and even those that you can do)
can be done with Plain \TeX\ instead. \index{compatibility!with@{with
plain \TeX}} This also means that \TeXsis\ should be compatible with
Plain \TeX\ macro packages, such as |epsf.tex| and |index.tex|, or
other specialized macro sets.\Footnote\dag{We cannot completely
guarantee this because other macro packages might define macros with
the same names as used by \TeXsis, although we have taken several
steps to prevent this kind of conflict.} Even if some of the Plain
macros are actually redefine in \TeXsis\ they are required to still
behave as described in \TeXbook.
\item{2)}
There are two different ways in which arguments may be passed to macros,
depending on the length of the argument. Short arguments are simply
enclosed in curly brackets, as in:\index{macros!arguments}
\TeXexample
\section{The nonlinear $\sigma$-model}
|endTeXexample
\item{}
Longer amounts of text (many lines) and text which is considered to be
enclosed in special environments is begun with something like |\thing|
and terminated with |\endthing|. For example,
\TeXexample
\abstract
A mechanism for total confinement of quarks, similar to that of
Schwinger, is defined which requires the existence of Abelian or
non-Abelian gauge fields. It is shown how to quantize ...
\endabstract
|endTeXexample
\item{}
This is similar to the |\begin{thing}| \ttdots |\end{thing}|
construction in \LaTeX\ \index{latex@{\LaTeX}} but is slightly easier
to type and, more important, is compatible with Plain \TeX. The reason for
preferring this way of delimiting text or arguments is that for very
long pieces of material it's much easier to look for |\thing| and
|\endthing| than it is to count curly brackets.
\Ignore % this is now true, but we don't want to advertise it!
If you really want
to type |\begin{thing}| and |\end{thing}| you can do so --- \TeXsis\
will understand it to mean |\thing| and |\endthing|.
\endIgnore
\item{3)}
When a \TeXsis\ macro is similar to a Plain \TeX\ macro it should, when
possible, have a similar name and syntax.
\index{macros!syntax}
Thus \cs{Footnote} in \TeXsis\ is used exactly like \cs{footnote} in
Plain \TeX, and in ruled tables ``|&|'' and ``|\cr|'' can be used
exactly as in an |\halign| (the exception being that, following rule~2
above, you begin the ruled table with |\ruledtable| and end it with
|\endruledtable| instead of enclosing the whole body of the table in
curly brackets).
\item{4)}
Macro names will be short and simple but descriptive.
\index{macros!names} Almost all Plain \TeX\ macro names are in lower
case for ease of typing, so macros with names containing uppercase
letters can be immediately recognized as being a part of \TeXsis\
(instead of Plain \TeX). As a general rule though we also try to use
lowercase for frequently used macro names for ease of typing.
\item{5)}
The source code defining the macros should be available to the users, so
that those who want to see how something is done can do so, and those who
want to make their own modifications can do so. The macro definitions
should include sufficient comments that (usually) someone with only a
little bit of experience with \TeX\ can understand what is going on.
Also, macros which perform similar functions and work together should be
kept in a single file, but separate parts of the whole package should be
kept in separate files. When possible these individual files should be
usable on their own with Plain \TeX. For example, right now it's
possible to use just the double column macros of \TeXsis\ by saying
|\input TXSdcol.tex|, and the ruled table macros can be used in Plain
\TeX\ by saying |\input TXSruled.tex|.
%======================================================================*
\pagecheck{0.75\vsize}
\section{Getting Started \label{sect.start}}
Assuming that \TeXsis\ has been properly installed on your
computer, using \TeXsis\ is as simple as using Plain \TeX. To
run \TeX\ with the \TeXsis\ format to process a manuscript file
called |myfile.tex| you simply give the command:
\index{running@{running \TeXsis}}
\def\HeadText{Getting Started}
\TeXexample
texsis myfile
|endTeXexample
As usual, the output from \TeX\ is
put in the file |myfile.dvi|, which you may print on a laser
printer or other output device.
Since \TeXsis\ is a superset of Plain \TeX, any file that you
process with Plain \TeX\ can be processed with \TeXsis, and you will
get the same results. In particular, Plain \TeX\ defaults to 10~pt.\
type and single spacing between lines, and so does \TeXsis\ unless you
initialize its special features. But since you are probably using
\TeXsis\ because of these special features, you should begin your
manuscript file with the initialization command
\TeXexample
\texsis
|endTeXexample
\noindent
One of the things this command does is switch the output to 12~pt.\
type, double spaced, which generally looks better on a small laser
printer. Commands that allow you to change the type size or line
spacing yourself are described in \SEC{fonts}. More
specialized initialization commands may be used in place of (or
in addition to) the |\texsis| command when you are using a
pre-defined document layout. These are described in
\SEC{fmts}.
Note also that just as in Plain \TeX\ there is a difference
between uppercase and lowercase letters in control word names.
Thus if you say \cs{TeXsis} instead of \cs{texsis} you won't
initialize any special features but you will print out
``\TeXsis.''
%==================================================*
\subsection{The Master File}
An important and useful concept for typesetting a paper or any
moderately long document is that of the {\it Master File}.\index{master
file} The idea is to create one small file which initializes \TeXsis\
with \cs{texsis}, makes any special definitions or sets parameters, and
then reads in the actual text of the document in sections using the
|\input| command. As a simple example consider a manuscript called
MUONS. The master file is called |MUONS.tex|, and contains the
following:
\TeXexample
\texsis % initialize TeXsis
\input MyMacros % read special macros for this paper
\input MUONSr % read references for the paper
\input MUONS0 % read title page for the paper
\input MUONS1 % read first section of manuscript
\input MUONS2 % read second section of manuscript
\ListReferences % print the reference list
\end
|endTeXexample
The file |MyMacros.tex| contains any special macro definitions used
in this paper. (If there are none, leave this line out.) The
file |MUONSr.tex| contains the references used in this paper,
beginning with |\referencelist| and ending with
|\endreferencelist|, as described in \SEC{refs}. The
file |MUONS0.tex| contains the commands for producing the title
page of the paper, as described in \SEC{fmts}. The
actual text of the manuscript is divided into two parts, which
are kept in the files |MUONS1.tex| and |MUONS2.tex|. To process the
entire document one simply runs \TeXsis\ on the master file with
the command
\TeXexample
texsis MUONS
|endTeXexample
\noindent
If you are familiar with computer programming you may think of
the master file as the main program and the other files as
subroutines called by the main program.
One of the great advantages of using a master file, aside from
keeping the manuscript organized, is that it lets you work on one
section of the paper at a time. For example, suppose you want to
run off a draft of just the first section of the paper called MUONS
above. You don't need to process the references, the title page,
or the second section of the paper. Recall that the percent sign
(|%|) is the comment character in \TeX\ --- anything appearing on
a line after a |%| is ignored by \TeX. Thus we simply edit the
master file and put a |%| in front of certain lines, like this:
\TeXexample
\texsis % initialize TeXsis
\draft % optional draft mode
\input MyMacros % read special macros for this paper
% \input MUONSr % read references for the paper
% \input MUONS0 % read title page for the paper
\input MUONS1 % read first section of manuscript
% \input MUONS2 % read section section of manuscript
% \ListReferences % print the references
\end
|endTeXexample
Now when you run \TeXsis\ on this file only the first section of
the paper will be processed, but it will use the macros defined
in |MyMacros.tex|, as well as any other definitions that you might
add to the master file. Once the first section is error free you
can repeat the process on the second section of the paper,
without rerunning the first section. After both sections are
correct you can reinstate all lines in the master file and
process the whole document.
% >>> EOF TXSintro.doc <<<
$! =========== TXSletr.doc ============
$ copy sys$input TXSletr.doc
%% file: TXSletr.doc TeXsis version 2.15
% $Revision: 15.11 $ : $Date: 92/07/27 22:42:51 $ : $Author: paige $
%======================================================================*
% TeXsis Manual - LETTERS AND MEMOS
% (C) Copyright 1989, 1992 by Eric Myers and Frank E. Paige
%======================================================================*
\ifx\undefined\bs \texsis\input TXSdocM.doc\draft\fi
\section{Letters, Memos and Referee Reports \label{sect.letr}}
The commands \CS{letter}, \cs{formletters}, \cs{memo} and
\cs{referee} initialize \TeXsis\ for producing letters or memos.
The letter formats follow closely the letter format given in Appendix~E
of \TeXbook.\index{letters}
\subsection{Letters}
\CS{letter} is designed for typing basic business letters
on letterhead stationary. It uses the following commands:
\description{~closing\qquad}\clump
\itm{\CS{letter}}
Initialize the letter format.
\itm{\CS{letterhead}\arg{xxxx}}
Print telephone extension \meta{xxxx} and current date. The default is
to position these for BNL letterhead stationary, but you can change it
in the |TXSsite.tex| file.
\itm{\CS{address}}
The name and address of the recipient should follow, in \cs{obeylines}
format. The first line is used as the name of the addressee in a running
headline for pages after the first.
\itm{\CS{body}}
Begins the body of the letter. The next line should be the
salutation, ``|Dear|....''
\itm{\cs{text}}
A synonym for \CS{body}.
\itm{\CS{closing}}
Begins the closing, in \cs{obeylines} format. The first line following
is the closing (e.g. "Sincerely Yours,") and the second is the sender's
name. When the letter is printed room is left for a signature.
Optional additional lines can be added after the name for the
sender's title, etc.
\itm{\CS{annotations}}
Optional annotations follow, in \cs{obeylines} format.
\itm{\CS{cc}}
Carbon copy. A "cc:" and the names following are printed,
properly aligned.
\itm{\CS{Encl}}
Enclosure. This is like \CS{cc} but "Encl:" is printed
for a list of enclosures.
\itm{\CS{ps}}
Optional postscript follows. This is not in \cs{obeylines} format.
\itm{\CS{endletter}\qquad}
Ends the letter. You can say \cs{bye} instead.
\enddescription
|\letter| automatically sets up a running headline for all pages
after the first, containing the addressee's name from \cs{address},
the date, and the page number. If you wish, you can turn off this
running headline by saying \cs{nopagenumbers}.
The use of these macros is illustrated by the following example:
\TeXexample
\letter
\letterhead{7734}
\address
Prof.~D. Knuth
Stanford University
Stanford, CA~94305
\body
Dear Prof.~Knuth:
We enclose the documentation and source code for a \TeX\
macro package which we have developed for physics papers.
\closing
Sincerely yours,
Eric Myers
Frank E.~Paige
\ps This stuff is also available by anonymous ftp.
\endletter
|endTeXexample
By default the closing material is indented about 3.5 inches.
The actual amount is set by \CS{longindent}, which you can change.
You should put the change on the same line as the \CS{closing},
like so:\index{letters!adjusting size}
\TeXexample
\closing\longindent=0pt
Sincerely yours,
Joe User
|endTeXexample
\noindent
This example puts the closing material flush with the left margin. You
should not put \CS{longindent}|=0pt| on the line following, because
\CS{closing} uses that line as the closing salutation (like
``Sincerely,'').
If a letter is somewhat too short or too long to fit on a page,
its length can be adjusted indirectly by changing the width of the text.
To do this insert \CS{letterwidth}\arg{width} immediately after
\cs{letter} to set the width of the text. This also automatically
adjusts the margins and the placement of the telephone extension and the
date.
%======================================================================*
\subsection{Form Letters}
The \CS{formletters} layout makes it simple to send
identical or similar letters to a list of people.
\index{form letters}\index{letters|see{form letters}}
\index{mail merge|see{form letters}}
The body of the form letter is stored in one file using the standard
\TeXsis\ letter format, while the control commands and a list of
addresses are put in a second file. The body of the letter should begin
with \cs{body} and end with \cs{endletter}, and it can contain an
arbitrary number of control sequences defined for each recipient. It
can make use of all the features of the letter format. For example it
might use
\TeXexample
\body
Dear \Whoever:
\if P\Job
I wish to apply for a postdoctoral position
\else\if F\Job
I wish to apply for a faculty position
\else
I wish to apply for a postdoctoral or faculty position
\fi\fi
at your institution. Enclosed you will find my curriculum vitae,
a list of publications, and ...
\closing
Sincerely yours,
Joe Gradstudent
\Encl Publication list
Curriculum vita
\endletter % don't say \bye here!
|endTeXexample
This example addresses the letter to |\Whoever|, and it uses the
first text if |\Job| is |P|, the second if |\Job| is |F|, and the
third otherwise. Thus form letters are very flexible.
The mailing list file initializes the form letter macros
and contains the list of addresses. \TeXsis\ should be run on
this file, not on the text of the letter! For the example above
it would have the form:
\TeXexample
\formletters{\letterhead{7734}}{letterbody.tex}
\BL Prof.\ John Doe
Department of Physics
University of Nowhere
Nowhere, OK 73019 USA
\V\Whoever{Professor Doe}
\V\Job{F}\EL
\BL Dr.\ Buckaroo Banzai
Physics Department
The Banzai Institute
Grovers Mill, NJ 08544
\V\Whoever{Dr.\ Banzai}
\V\Job{P}\EL
\BL ...
... \EL
\endform
\bye
|endTeXexample
\noindent
The first argument of \cs{formletters} is something like the usual
\cs{letterhead} macro, with your phone number. Depending on your
letterhead this might have multiple parameters or might even be
several control sequences (all enclosed in a set of curly braces, of
course).
The second argument to \cs{formletters} is the name of the file
containing the body of the letter. The idea is that the stuff in the
first argument gets put into the letter {\it before} the address, while
the body of the letter (read from the file) is what goes after the
address.
Each letter begins with \CS{BL} ("Begin Letter") and has the name of the
addressee on the same line and the address on the following lines. Any
``Variables'' used in the letter can be defined using \cs{V}, which is
just an abbreviation for \cs{gdef}. If necessary, variables can also be
defined before the \CS{BL}. Each address in the mailing list is ended by
\CS{EL} ("End Letter"). When the \CS{EL} is executed it reads in the
file containing the text for the letter and actually produces the letter.
Any address in the list can be ignored simply by replacing the
\CS{BL} with \CS{IL} ("Ignore Letter"). In particular, this can be done
by a simple global edit after each batch of letters is made, and the
same file can then be used to send a second mailing by changing \CS{IL}
back to \CS{BL} for a select subset of addresses.
\bigskip
\nosechead{Mailing Labels}
The same address file can be used to produce mailing labels
instead of letters by replacing |\formletters{...}{...}| with
\cs{formlabels}. It is assumed that there are three columns of names and
addresses to fit on standard photocopy machine mailing labels. With the
default parameters nine labels each 1~in.\ high are printed per column
with the top and bottom rows left blank. This can be changed, and the
alignment of the labels can be adjusted, by setting appropriate values
for the following dimensions:
\TeXexample
\fullHsize=8.500in % hsize for label page
\fullVsize=9.999in % vsize for label page
\lblHsize=2.833in % width of standard label
\lblVsize=1.000in % height of standard label
\lblVoffset=0.100in % vertical starting position
\lblHoffset=-0.500in % horizontal starting position
|endTeXexample
Choosing appropriate values may require some experimentation with your
printer and labels. When the correct values are found, they can be
set in the file |TXSsite.tex| before compiling the format (see Appendix~A).
\pagecheck{0.5\vsize}
%======================================================================*
\subsection{Memos}
\CS{memo} sets up a special format for memoranda, including a
header at the top of the page with the name of your organization and the
word "MEMORANDUM". The organization name defaults to ``\ORGANIZATION''
at this installation but this can be changed by\index{memos}
\example
|\def|\cs{ORGANIZATION}\arg{name}
\endexample
(This can be done once in the file |TXSsite.tex| before compiling
\TeXsis, as described in Appendix~\use{install},\index{memos!customization}
or you can explicitly
put the name of your organization in your file.) The commands for the
memo format are:
\description{Xendmemo\quad}\clump
%
\itm{\CS{memo}}
Initialize \TeXsis\ for memo format.
%
\itm{\CS{Date}}
Prints the word "{\twelvess Date:}" and the date, which must be on the
same line. If no date is given, then the current date is used. If you'd
rather have the date in the upper right hand corner, as in a letter, use
|\letterdate| instead of \CS{Date}.
%
\itm{\CS{To}}
Prints the word "{\twelvess To:}" and the name(s) which follow.
%
\itm{\CS{From}}
Prints the word "{\twelvess From:}" and the name(s) which follow
%.
\itm{\CS{Subj}}
Prints the word "{\twelvess Subject:}" and the subject which
follows. The subject may be several lines long. The first line
of the subject field is used in a running headline at the top of
all pages following the first.
%
\itm{\CS{n}}
New line for |\To|, |\From|, or |\Subj|.
%
\itm{\CS{nopagenumbers}}
Turns off the running subject headlines and the page numbers.
This must be typed after |\memo| since it is redefined by the
memo format.
%
\itm{\CS{Text}}
Begins the text of the memo. You can also say \cs{body}.
%
\itm{\CS{annotations}\qquad}
Optional annotations follow, in \cs{obeylines} format.
%
\itm{\CS{cc}}
Carbon copy. A "cc:" and the names following it are printed,
properly aligned in \cs{obeylines} format.
%
\itm{\CS{Distribution}\qquad}
This is like \CS{cc} but prints "Distribution:" instead.
%
\itm{\CS{Encl}}
This is like \CS{cc} but prints "Encl:" instead, as for letters.
%
\itm{\CS{ps}}
Optional postscript follows. This is not in \cs{obeylines} format.
%
\itm{\CS{endmemo}}
Ends the memo. You can say \cs{bye} instead.
\enddescription
All of these commands with mixed case names have synonyms which are
the same name but in all lower case letters. The use of the \cs{memo}
format is illustrated by the following example:
\TeXexample
\memo
\Date
\To \TeXsis\ Users
\From E. Myers, F.E. Paige
\Subj \TeXsis\ 2.15
\text
\TeXsis\ 2.15 is now available. The new version adds
several features and corrects various bugs. Documentation is
also available.
\Distribution
A. Blake
I. Harrity
B. Nichols
...
\endmemo
|endTeXexample
\relax
%======================================================================*
\subsection{Referee Reports}
\CS{referee} sets up a document format very much like the
\cs{memo} format, although there are some important differences.
\index{referee reports}
Referee reports are supposed to be confidential, so instead of
printing the name of your organization at the top of the first
page it puts the words ``Referee Report.'' In the
\CS{referee} format you can use the same commands that are used in
the \cs{memo} format, such as |\To| and |\Date|, but if you use
\cs{From} a warning message will be printed on your screen. (This
is only a warning, it still does what it has been asked to do!)
There are also some additional commands for the referee
report format:
\description{~authors\qquad}\clump
%
\itm{\cs{title}}
The title of the paper being reviewed should follow this on the
same line. This is similar to |\Subj| in the memo format.
%
\itm{\cs{author}}
Prints ``{\twelvess AUTHOR:}'' and the name that follows on the
same line.
%
\itm{\cs{authors}}
Same as \cs{author} for a paper with more than one author.
%
\itm{\CS{MSref}}
Prints ``{\twelvess MANUSCRIPT:}'' and the manuscript reference number
which follows.
\enddescription
The text of the report should begin with \cs{text} or
\cs{body}, just as for a memo, and the whole document should end
with |\endmemo| or \cs{bye}. An example of the referee report
format is given by the following:
\TeXexample
\referee
\date 1 April 1992
\title \TeXsis\ -- \TeX\ Macros for Physicists
\authors E.~Myers and F.E.~Paige
\MSref LP-3105
\text
This is pretty good, but it's too long
for Physical Review Letters.
\bye
|endTeXexample
This produces a report which looks something like:
\bigskip
\begingroup
\line{\hfil
\tightboxit{\hbox{\vbox to 13cm{\leftskip=1cm
\referee\tenpoint\hsize=10cm\rightskip=1cm
\centerline{{\twelvepoint\bf Referee Report}}
\bigskip
\memoitem{DATE:} 1 April 1992
\memoitem{TITLE:} \TeXsis\ -- \TeX\ Macros for Physicists
\memoitem{AUTHORS:} E.~Myers and F.E.~Paige
\memoitem{MANUSCRIPT:} LP-3105
\text
This is pretty good, but it's too long
for Physical Review Letters.
\vfill}}}
\hfil}
\endgroup
\vfill
%>>> EOF TXSletr.doc <<<
$! =========== TXSmemo.tex ============
$ copy sys$input TXSmemo.tex
% file: TXSmemo.tex TeXsis version 2.15
% $Revision: 15.1 $ : $Date: 92/05/31 21:30:08 $ : $Author: myers $
%======================================================================*
% This is a set of TeX macros for producing simple memos.
% The sytnax is:
%
% \MemoFormat (or simply \memo in TeXsis)
% \to <name>
% \from <name>
% \subj <whatever the memo is about> or \re is same as \subj
% \date <date of memo>
% \text
% <text of memo>
% \bye
%
%----------------------------------------------------------------------*
\message{Memo Format.}
% ---------- Counters and such:
\newdimen\memoindent \memoindent=2.54cm % indent for \to, \from, etc.
\newdimen\firstheadoffset % \headlineoffset for first page only
\firstheadoffset=0pt % start with headline down for \ORGANIZATION
% ---------- Initialization: Memo document format for memoranda
\def\Memo{\ContentsSwitchfalse% % no table of contents
\refswitchfalse % no reference list
\inittexsis % initialize TeXsis
\MemoFormat}% % Setup using \MemoFormat
\def\memo{\Memo} % synonym
\def\MemoFormat{%
\voffset=0.125truein % top margin
\hsize=6.5truein % width of text
\raggedbottom %
\advance \vsize by -\voffset % subtract \voffset from vertical size
\nopagenumbers % no footlines
\let\makeheadline=\makememhed % alternate way of making
\headline={\MemoHeadline}% % headlines for memos
\RunningHeadstrue % default
\headlineoffset=0.8cm % raise all following headlines
\firstheadoffset=0pt % start with headline down for
\def\subjectline{}% % start with this null
\def\nopagenumbers{\RunningHeadsfalse}% redefine \nopagenumbers
\def\pagenumbers{\RunningHeadstrue}%% and \pagenumbers for this document
\twelvepoint % default is 12pt
\quoteon % enable easy quotes
\def\annotations{\annotatememo}% % annotations for memo
\def\cc{\ccmemo}% % carbon copy for memo
\def\Encl{\enclmemo}% % enclosure for memo
\def\ps{\psmemo}% % post script for memo
\def\endmode{\relax}% % for first item
\def\to{\ifmmode\rightarrow\else\To\fi}%
\let\text=\memotext % enable \text
\let\Text=\memotext % \Text is a synonym
\let\body=\memotext % \body is synonym for \text
\memoheader % do headher at top
}
% \ORGANIZATION names your institution. Replace it with whatever you
% want for your own institution.
\def\ORGANIZATION{\hbox{\space}} % change this in TXSsite.tex!
% \memoheader prints the word MEMORANDUM at the top of the page and
% sets up for \to, \from, etc...
\def\memoheader{% % banner for top of first page
\pageno=1 % begin on page 1
\centerline{\fourteenpoint % 14 pt type centered
M E M O R A N D U M}% %
\bigskip\bigskip % space
\relax}% %
%---------------------------------------
% new def of \makeheadline for MEMOFORMAT, uses \firstheadoffset
\def\makememhed{\vbox to 0pt{\vskip-22.5pt
\ifnum\pageno>1\vskip-\headlineoffset
\else\vskip-\firstheadoffset\fi
\line{\vbox to 8.5pt{}\the\headline}\vss}\nointerlineskip}%
% \MemoHeadline prints the subject and page number at the top of each page
\def\MemoHeadline{% headline for Memoranda
\ifnum\pageno>1 % if not first page...
\ifRunningHeads % running headlines on top of page?
{\tenrm\subjectline\hfil Page~\folio}% % print subject line and page #
\else % no running headlines?
{\hfil}% % then nothing
\fi
\else % On the first page do header
{\hfil\twelvess\ORGANIZATION\hfil}% print name of organization
\fi}%
%-----------------------------------------------------------------------
% \memoitem is the basic template for each field
\def\memoitem#1{\endmode % end previous field
\def\endmode{\par\endgroup}% % set up to end the field
\begingroup % begin a new field
\parskip=0pt % no \parskip
\singlespaced % no big space if several lines
\medskip\noindent % skip down a bit
\hangindent=\memoindent % hanging indentation
\hangafter=1 % after first line
\hbox to \memoindent{{\tenss #1}\hfil}% label the field
\nobreak}% % don't break after label
\def\endmode{\relax} % for first item
%---------------------------------------
% TO: and FROM:
\def\To{\memoitem{TO:}}
\def\TO:{\To}
\def\From{\memoitem{FROM:}}
\def\FROM:{\From}
\def\from{\From}
%---------------------------------------
% CC: (Carbon Copies)
\def\ccmemo{\endmode
\def\endmode{\vskip0pt\endgroup}%
\bigskip % skip down a bit
\begingroup\obeylines % obey line ends
\parskip=0pt % no skip between items
\ccitem{cc:\ }%
}
\def\CC{\cc}
% ---------- \ccitem does the work for \cc and other end of memo fields
\def\ccitem#1{\setbox0\hbox{#1\quad}% % box0 = argument
\parindent=\wd0 % get its width
\hang % hanging indentation
\rlap{\copy0}% % and write it
\vskip-\baselineskip\relax}% % kill the skip
% ---------- \Distribution is like CC (\obeyines format)
\def\distribution{\endmode
\def\endmode{\vskip0pt\endgroup}%
\bigskip %
\begingroup\obeylines % obey line ends
\def\n{\par}% % break lines at \n
\parskip=0pt %
\ccitem{Distribution:}%
}
\def\Distribution{\distribution}% % synonym
% ---------- \enclmemo is also like \cc (obeylines format)
\def\enclmemo{\endmode %
\def\endmode{\vskip0pt\endgroup}% %
\bigskip % skip down a bit
\begingroup\obeylines % obey line ends
\parskip=0pt % no skip between items
\ccitem{Encl:\ }%
}
% ---------- \annotatememo is \annotations for memo format
\def\annotatememo{\endmode % end previous item
\def\endmode{\vskip0pt\endgroup}% % set up new ending
\begingroup % changes local
\nobreak\bigskip\nobreak % skip some
\parindent=0pt\parskip=0pt % no indent or skip
\obeylines}% % obey line endings
% ---------- \psmemo does \ps for a memo
\def\psmemo{\endmode % end previous item
\def\endmode{\vskip0pt\endgroup}% % set up ending
\begingroup % start a group
\nobreak\bigskip\nobreak % skip some
\interlinepenalty 5000 % avoid breaks
\def\par{\endgraf\penalty 5000}}% % avoid breaks
%---------------------------------------
% SUBJECT: and RE: (saves first line in \subjectline for tops of pages)
\def\subjectitem#1{\endmode % close previous field
\def\endmode{\relax}% % turn off \endmode before going to \memoitem
\gdef\@subjtype{#1}% % label the field
\begingroup\obeylines % obeylines is on to get first subject line
\getsubject}% % get first line
\def\Subj{\subjectitem{SUBJECT:}}%
\def\SUBJ{\subjectitem{SUBJECT:}}%
\def\subj{\subjectitem{SUBJECT:}}%
\def\subject{\subjectitem{SUBJECT:}}%
\def\Subject{\subjectitem{SUBJECT:}}%
\def\re{\subjectitem{RE:}}%
\def\RE{\subjectitem{RE:}}%
% \getsubject gets the first line in the field in \subjectline
% for use in the headline at the top of pages following
{\obeylines % first line of subject is \subjectline
\gdef\getsubject#1
{\endgroup % end \obeylines
\gdef\subjectline{#1} % define \subjectline as the first line
\memoitem{\@subjtype}\subjectline\space}% print SUBJECT: line
}% close obeylines
%---------------------------------------
% \date takes what follows on the same line and uses it as the
% date of the memo. If nothing follows then today's date is used.
% It is important for the date, if given, to be on the same line as \date.
\def\Date{\endmode % close previous field
\def\endmode{\relax}% % turn off \endmode before going to \memoitem
\begingroup\obeylines %
\getdate} % get the date, or use today's
\def\DATE{\Date} % synonym
\def\date{\Date}
{\obeylines % look for a given date
\gdef\getdate#1
{\endgroup % close \obeylines
\ifx?#1?\relax % if no date given, use today's
\gdef\memodate{\number\day\ \monthname{\month}\ \number\year}%
\else %
\gdef\memodate{#1} % if date is given, use it
\fi %
\memoitem{DATE:}\memodate}% %
}% close \obeylines for definitions
\def\monthname#1{\ifcase #1 \errmessage{0 is not a month.}
\or January\or February\or March\or April\or May\or
June\or July\or August\or September\or October\or
November\or December%
\else \errmessage{#1 is not a month.}\fi}
%---------------------------------------
% TEXT: \text sets up for text of memo
\def\memotext{\endmode % close last item
\def\endmode{\bigskip\vfil}% % \endmode is now blank space
\bigskip\bigskip % skip down for text
\parskip=\normalbaselineskip % \parskip is one blank line
\noindent % like a letter
}
\def\text{\memotext} % start with \text = \memotext
\def\Text{\memotext} % \Text is a synonym
% use \endmemo to end a memo, especially if you use \CC or similar.
\def\endmemo{\endmode\vfill\eject\end} % ends CC: etc, then quits
%=======================================================================
% Referee format for Referee Reports
%
\def\Referee{\ContentsSwitchfalse % no table of contents
\auxswitchfalse % no need for an .AUX file
\refswitchfalse % no reference list
\inittexsis % initialize
\RefReptFormat} % Setup using \MemoFormat
\def\referee{\Referee}% % synonym
\def\RefReptFormat{%
\voffset = 0.125 true in % top margin
\hsize = 6.5 true in % width of text
\raggedbottom %
\advance \vsize by -\voffset % subtract \voffset from vertical size
\nopagenumbers % no footlines
\headlineoffset=0.8cm % raise all following headlines
\firstheadoffset=0pt % start with headline down for
\let\makeheadline=\makememhed %
\def\ORGANIZATION{{\fourteenpoint\bf Referee Report}}% change \ORGANIZATION
\def\subjectline{Referee Report}% % running head is ``Referee Report''
\headline={\MemoHeadline}% % just like a memo
\def\nopagenumbers{\RunningHeadsfalse}% redefine \nopagenumbers
\def\pagenumbers{\RunningHeadstrue}%% and \pagenumbers for this document
\twelvepoint % default is 12pt
\singlespaced\whitespaced % widely spaced, but not double
\parskip=\baselineskip % extra space between paragraphs
\def\endmode{\relax}% % for first item
\quoteon % enable easy quotes
\def\to{\ifmmode\rightarrow\else\To\fi}%
\def\From{\RefFrom}% % say something about \From
\let\text=\memotext %
\let\body=\memotext %
\def\authors{\memoitem{AUTHORS:}}%
\def\author{\memoitem{AUTHOR:}}%
\def\title{\subjectitem{TITLE:}}%
\def\MSref{\memoitem{MANUSCRIPT:}}%
\def\manuscript{\@obsolete\manuscript\MSref\memoitem{MANUSCRIPT:}}%
\def\Number{\memoitem{NUMBER:}}%
\hbox{\space}\bigskip} % space down from top a bit.
\def\RefFrom{\begingroup\obeylines % obeylines to get first subject line
\getFrom}% % get first line
{\obeylines % look for line endings
\gdef\getFrom#1
{\endgroup % end \obeylines
\emsg{> Reminder: Referee Reports are usually anonymous. This one says...}%
\emsg{FROM: #1}% % say something about FROM
\memoitem{From:}#1\space}% % but do it anyway
} % close obeylines
%>>> EOF TXSmemo.tex <<<